package com.rd.student.jiaji.class3.wangyanbo.task27;

import java.io.*;

public class TestConvert {
    public static void main(String[] args) throws Exception{
        File file=new File("stream.txt");
        //字节流可以转化为字符流
        InputStream is = new FileInputStream("stream.txt");
        Reader reader = new InputStreamReader(is);
        char[] arr = new char[(int)file.length()];
        reader.read(arr);
        System.out.println(new String(arr));


        reader.close();
        is.close();


    }
}
